#!/usr/bin/python
# -*- coding: UTF-8 -*-
# 部署api nohup python deploy_api.py >> deploy_api.log 2>&1 &

from flask import Flask,request
from sh import sh

app = Flask(__name__)


@app.route('/')
def api_get():
    p=request.args.get("p")
    o=request.args.get("o")
    if("haibin666" != p):
        return "没有资格操作"
        
    s=sh('/root/run.sh',o)
    return str(s)


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True)
